package com.example.resourceserver.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

/**
 * @author huawenchuan
 * @date 2021-05-08 16:43
 */
@RestController
@RequestMapping("/producer")
public class ProducerController {

    @GetMapping("/findAll")
    public String findAll(Principal principal, Authentication authentication){
        return principal.toString();
    }
}
